<template>
  <Suspense timeout="0">
    <template #default>
      <el-config-provider :locale="zhCn">
        <router-view v-slot="{ Component }">
          <component :is="Component"></component>
        </router-view>
      </el-config-provider>
    </template>
  </Suspense>
</template>
<script lang="ts" setup>
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import watermark from '@/utils/water'
import { getToken } from '@/utils/auth'
import useUserStore from '@/store/modules/user'
const userStore = useUserStore()
if (getToken()) watermark.set(userStore?.userInfo?.userName || '管理员')
</script>
<style lang="scss"></style>
